<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        let scoket = new WebSocket('ws://localhost:3000')
        scoket.onopen = function() {
            scoket.send('第一次发送websocket')
        }
        scoket.onmessage = function(data) {
                console.log(data);
        }
        
    </script>
</body>
</html>